
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
image-filter-core
Advanced tools
Small library that relies on webworkers to apply image transformations.
There are several modules that use image-filter-core
, such as:
But you can easily create your own transformation function and rely on image-filter-core
to handle the webworkers and to split the work.
npm install image-filter-core --save
It returns a canvas with the given width and height
var imageFilterCore = require('image-filter-core');
var canvas = imageFilterCore.getCanvas(100, 100);
Given a ImageData it returns the dataURL
var imageFilterCore = require('image-filter-core');
var canvasURL = imageFilterCore.convertImageDataToCanvasURL(imageData);
Provide the ImageData, the transformation function, the options to be passed to the transformation function and the number of workers to split the work.
var imageFilterCore = require('image-filter-core');
imageFilterCore.apply(data, transform, options, nWorkers)
.then(function (imageData) {
// Do whatever you want with imageData
});
The transform function receives ImageData, the length of data to transform and the options that the developer provided to image-fiter-core, example transformation function for the threshold effect:
function transform (data, length, options) {
for (var i = 0; i < length; i += 4) {
var r = data[i];
var g = data[i + 1];
var b = data[i + 2];
var v = (0.2126 * r + 0.7152 * g + 0.0722 * b >= options.threshold) ? 255 : 0;
data[i] = data[i + 1] = data[i + 2] = v;
}
}
FAQs
Core module for image-filter
The npm package image-filter-core receives a total of 136 weekly downloads. As such, image-filter-core popularity was classified as not popular.
We found that image-filter-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.